import { EventTypeEnum } from 'src/common/constant/enums';
import { ApiProperty } from '@nestjs/swagger';
import { IsOptional, IsNumber, IsEnum } from 'class-validator';

export class CreateStageEventDto {
  @ApiProperty({ description: '事件 ID', required: false })
  @IsOptional()
  @IsNumber()
  id?: number;

  @ApiProperty({ description: '阶段 ID', required: true })
  @IsNumber()
  stageId: number;

  @ApiProperty({ description: '事件顺序', required: true })
  @IsNumber()
  eventOrder: number;

  @ApiProperty({ description: '事件类型', enum: EventTypeEnum, required: true })
  @IsEnum(EventTypeEnum)
  type: EventTypeEnum;

  createBy?: number;
  updateBy?: number;
}